<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@simple')->name('home');
    $router->get('shop/edit_goods', 'ShopController@editGoods')->name('editGoods');
    $router->post('shop/upload_loop_img', 'ShopController@upload_loop_img');
    $router->any('shop/edit_goods_handle', 'ShopController@edit_goods_handle');
    $router->any('shop/goods_list', 'ShopController@products_list');
    $router->any('shop/delete_products', 'ShopController@delete_products');
    $router->any('shop/change_products_status', 'ShopController@changeProductsStatus');
    $router->any('shop/upload_detail_img', 'ShopController@upload_detail_img');

    $router->any('order/order_detail', 'OrdersController@orderDetail');
    $router->any('order/order_list', 'OrdersController@ordersList');
    $router->any('order/prepare_goods', 'OrdersController@prepare_goods');
    $router->any('order/deliver_goods', 'OrdersController@deliver_goods');
    $router->any('order/get_area', 'OrdersController@getGeneralAddress');
    $router->any('order/modify_address', 'OrdersController@modifyAddress');

    //任务模块
    $router->get('task/index', 'TaskController@index')->name('taskIndex');
    //获取单个任务
    $router->any('task/get_task', 'TaskController@get_task');
    //添加任务
    $router->post('task/add_task', 'TaskController@add_task');
    //更新任务
    $router->post('task/update_task', 'TaskController@update_task');
    //启用、禁用任务
    $router->post('task/delete_task', 'TaskController@delete_task');

    //设备模块  品牌管理
    $router->get('device/facory_list','DeviceController@facoryList')->name('facoryList');
    $router->any('device/one_data','DeviceController@oneData');
    $router->any('device/delete_facory','DeviceController@deleteFacory');
    $router->any('device/add_facory','DeviceController@add_facory');
    $router->any('device/brand_list','DeviceController@brand_list');

    //设备管理
    $router->any('device/device_list','DeviceController@deviceList');
    $router->any('device/add_device','DeviceController@add_device');
    $router->any('device/one_device','DeviceController@oneDevice');
    $router->any('device/delete_device','DeviceController@deleteDevice');
    $router->post('device/upload_loop_img', 'DeviceController@upload_loop_img');

    //患者管理
    $router->any('user/index', 'UserController@userIndex');           //用户列表
    $router->any('user/device', 'UserController@deviceIndex');        //设备绑定
    $router->any('user/bundled', 'UserController@userBundled');        //用户绑定
    $router->any('user/details', 'UserController@userDetails');       //基本信息
    $router->any('user/measure', 'UserController@userMeasure');       //测糖记录
    $router->any('user/insulin', 'UserController@userInsulin');       //用药记录
    $router->any('user/info', 'UserController@userInfo');       //用户信息接口


    //药品管理
    $router->any('medicinal/list', 'MedicinalController@medicinalIndex');
    $router->any('medicinal/add_medicinal', 'MedicinalController@insertMedicinal');
    $router->any('medicinal/one_medicinal','MedicinalController@oneMedicinal');
    $router->any('medicinal/delete_medicinal','MedicinalController@deletMedicinal');
    $router->any('api/medicinal/list','MedicinalController@medicinalList');

    //用户默认药品
    $router->any('user/default_medicinal', 'UserController@defaultMedicinal');

    //医生管理
    $router->any('doctor/update', 'DoctorController@doctorUpdate');
    $router->any('doctors/index', 'DoctorController@index');
    $router->any('doctor/audit', 'DoctorController@adviceAudit');
    $router->any('doctor/info', 'DoctorController@doctorInfo');
    $router->any('doctor/add_field', 'DoctorController@doctorAddField');
    $router->any('doctor/advice', 'DoctorController@doctorAdvice');
    $router->any('prescription/audit', 'DoctorController@doctorAudit');
    $router->any('api/audit/refused', 'DoctorController@auditRefused');
    $router->any('history/advice', 'DoctorController@historyAdvice');
    $router->any('doctor/workbench', 'DoctorController@workbench');
    $router->post('doctor/connected_video', 'DoctorController@connected_video');
    $router->any('doctor/get_diagnose_info', 'DoctorController@getDiagnoseInfo');
    $router->any('doctor/consulting/get_consulting_time', 'ConsultingController@getConsultingTime');
    $router->any('doctor/consulting/set_consulting_time', 'ConsultingController@setConsultingTime');
    $router->any('doctor/get_diagnose_list', 'ConsultingController@getDiagnoseList');
    $router->any('doctor/get_diagnose', 'ConsultingController@getDiagnose');
    $router->any('doctor/reply_diagnose', 'ConsultingController@doctorReply');
    $router->any('doctor/statistics', 'ConsultingController@statistics');
});
